import os

def get_total_size_of_folder(folder_path):
    """
    计算给定文件夹下所有文件的总大小。

    参数:
    folder_path (str): 文件夹的路径

    返回:
    int: 文件夹下所有文件的总字节数
    """
    total_size = 0
    for root, dirs, files in os.walk(folder_path):
        for f in files:
            file_path = os.path.join(root, f)
            total_size += os.path.getsize(file_path)
    return total_size

folder_path = "D:/students.txt"
print(f"文件夹下所有文件总大小: {get_total_size_of_folder(folder_path)}字节")